package com.google.code.swingonfire.utility;

import static com.google.code.swingonfire.utility.Colors.*;
import static java.awt.Color.*;

import java.awt.Color;

public class Gradients
{

    private Gradients()
    {
        super();
    }

    public static Gradient toTransparent(Color color)
    {
        return Gradient.start(color).fraction(1).end(transparent(color, 1));
    }

    public static Gradient glossy(Color color)
    {
        return Gradient.start(WHITE).length(1).color(brighter(color, 0.2)).fraction(0.5)
            .color(brighter(color, 0.1), WHITE).length(1).color(WHITE, darker(color, 0.1)).fraction(0.5)
            .color(darker(color, 0.2)).length(1).end(BLACK);
    }
}
